package com.forevershine.business.persistent.impl;

import org.apache.ibatis.session.SqlSession;

import com.forevershine.business.model.ActionNotes;
import com.forevershine.business.persistent.ActionNotesDao;
import com.forevershine.business.persistent.IDataAccessor;

public class ActionNotesDaoImpl implements ActionNotesDao {

	@Override
	public ActionNotes loadActionNotes(IDataAccessor dataAccessor, int taskId) {
		SqlSession session =  dataAccessor.getSession();
		return (ActionNotes)session.selectOne("selectActionNotes", taskId);
	}

	@Override
	public void insertActionNotes(IDataAccessor dataAccessor,
			ActionNotes actionNotes) {
		SqlSession session =  dataAccessor.getSession();
		session.insert("insertActionNotes", actionNotes);
		session.commit();
		
	}

}
